const {Schema,model} = require('mongoose');
//创建结构对象，并生成结构管理文档
const errorsSchema = new Schema({
    
    ErrorAnswer:String,
    //问题的ID
    errorQuestions_id: {
      type: Schema.Types.ObjectId,
      ref: 'questionsModel'
    },
    user_id: {
      type: Schema.Types.ObjectId,
      ref: 'studentsModel'
    }
    
  }, { versionKey: false });
  //设置数据模型
  const errorsModel =  model('errorsModel',errorsSchema,'ErrorQuestions');
  
  module.exports={
      errorsModel
  }